package com.example.zhugenew.adapter;

import android.content.Context;
import android.widget.ImageView;
import android.widget.TextView;

import com.bumptech.glide.Glide;
import com.example.mymvplibrary.adapter.BaseAdapter;
import com.example.mymvplibrary.adapter.BaseViewHolder;
import com.example.zhugenew.R;
import com.example.zhugenew.bean.GuessBean;

import java.util.List;

public class GuessAdapter extends BaseAdapter<GuessBean.ListBean> {
    public GuessAdapter(List<GuessBean.ListBean> datas, Context context, int layoutId) {
        super(datas, context, layoutId);
    }

    @Override
    public void bindData(BaseViewHolder holder, GuessBean.ListBean listBean, int pos) {
        ImageView iv_guess = holder.getView(R.id.iv_guess_image);
        Glide.with(context).load(listBean.getHouse_thumb()).into(iv_guess);
        TextView tv_guess_title = holder.getView(R.id.tv_guess_title);
        TextView tv_guess_text = holder.getView(R.id.tv_guess_text1);
        TextView tv_guess_text2 = holder.getView(R.id.tv_guess_text2);
        TextView tv_guess_text3 = holder.getView(R.id.tv_guess_text3);
        TextView tv_guess_text4 = holder.getView(R.id.tv_guess_text4);
        TextView tv_guess_text5 = holder.getView(R.id.tv_guess_text5);
        TextView tv_guess_text6 = holder.getView(R.id.tv_guess_text6);
        TextView tv_guess_text7 = holder.getView(R.id.tv_guess_text7);
        TextView tv_guess_text8 = holder.getView(R.id.tv_guess_text8);
        TextView tv_guess_text9 = holder.getView(R.id.tv_guess_text9);
        TextView tv_guess_text10 = holder.getView(R.id.tv_guess_text10);
        TextView tv_guess_text11 = holder.getView(R.id.tv_guess_text11);




        tv_guess_text10.setText(listBean.getAverage_price()+"");
        tv_guess_text11.setText(listBean.getAverage_price_unit());
        tv_guess_text9.setText(listBean.getMin_price_unit());
        tv_guess_text8.setText(listBean.getMin_price()+"");
        tv_guess_text7.setText(listBean.getBorough_name());
        tv_guess_text6.setText(listBean.getHouse_hall_unit()+" | ");
        tv_guess_text5.setText(listBean.getHouse_hall()+"");
        tv_guess_text4.setText(listBean.getHouse_room_unit()+"  ");
        tv_guess_text3.setText(listBean.getHouse_room()+"");
        tv_guess_text2.setText(listBean.getHouse_totalarea_unit()+" | ");
        tv_guess_title.setText(listBean.getHouse_title());
        tv_guess_text.setText(listBean.getHouse_totalarea()+"");
    }
}
 